﻿
@{
    ViewBag.Title = "取消订单";
    var order = ViewBag.Order as CubicFWNet.Data.ViewModal.OrderInfo;
    var opList = ViewBag.OpList as List<CubicFWNet.Data.ViewModal.ProductView>;
}


<section class="content-header">
    <h1>
        取消订单
    </h1>
    <ol class="breadcrumb">
        <li><a href="javascript:void(0);"><i class="fa fa-dashboard"></i>@Resources.Global.PageTitle</a></li>
        <li><a href="@Url.Action("Index","Home")">首页</a></li>
        <li class="active">取消订单</li>
    </ol>
</section>

<section class="content">
    <form class="form-horizontal" method="post" id="formMain">
        <div class="box box-solid">
            <div class="box-body">
                <div class="row">

                    <input type="hidden" name="OID" id="OID" value="@order.Id" />

                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Number" class="col-sm-3 control-label">订单编号</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="@order.Number" readonly />
                        </div>
                    </div>

                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Number" class="col-sm-3 control-label ">客户信息</label>
                        <div class="col-sm-9" style="border:none">
                            @*<span onclick="ShowModal('@order.CustomeId')" name="CustomerName" id="CustomerName" class="form-control linkLayout">@order.CustomerName</span>*@
                            <input type="text" name="CustomerName" id="CustomerName" class="form-control " readonly value="@order.CustomerName" />
                        </div>
                    </div>

                    <div class="form-group col-md-6 col-sm-12">
                        <label class="col-sm-3 control-label">发货方式</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="@order.Delivery" readonly />
                        </div>
                    </div>

                    <div class="form-group col-md-6 col-sm-12">
                        <label for="SendTime" class="col-sm-3 control-label">希望交货期</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" value="@order.SendTime" readonly />
                        </div>
                    </div>

                </div>

                <div id="divProList">
                    @foreach (var item in opList)
                    {
                        <div class="row panelLayout">
                            <div class="form-group col-md-6 col-sm-12">
                                <label for="Creator" class="col-sm-3 control-label">产品名称</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" value="@item.Name" readonly="readonly" />
                                </div>
                            </div>
                            <div class="form-group col-md-6 col-sm-12">
                                <label for="Creator" class="col-sm-3 control-label">订货数量</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" value="@item.Amount" readonly="readonly" />
                                </div>
                            </div>
                            <div class="form-group col-md-6 col-sm-12">
                                <label for="Creator" class="col-sm-3 control-label">价格</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" value="@item.FinalPrice" readonly="readonly" />
                                </div>
                            </div>
                        </div>
                    }
                </div>

                <div class="row">
                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Memo" class="col-sm-3 control-label">备注</label>
                        <div class="col-sm-9">
                            <textarea rows="3" class="form-control" >@order.Memo</textarea>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="form-group col-md-6 col-sm-12">
                        <label for="Creator" class="col-sm-3 control-label">创建人</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="Creator" name="Tolerance" value="@order.CreatorName" readonly="readonly" />
                        </div>
                    </div>
                    <div class="form-group col-md-6 col-sm-12">
                        <label for="CreateTime" class="col-sm-3 control-label">创建时间</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="CreateTime" value="@order.CreateTime" readonly="readonly" />
                        </div>
                    </div>
                </div>

            </div>
            <div class="box-footer">
                <div class="box-footer">
                    <span class="btn btn-primary " onclick="FormSub()">取消订单</span>&nbsp;&nbsp;&nbsp;&nbsp;
                    <label class="danger">@ViewBag.Info</label>
                </div>
            </div>
        </div>
    </form>
</section>

@section Scripts {
    <script>
        function FormSub() {

            $("#formMain").submit();
        }
    </script>
}